Support AS6 install paths#16
Merged
Merged
Conversation
AS6 installs to 'C:\Program Files (x86)\BRAutomation' instead of the legacy 'C:\BrAutomation'. getASPath() now probes a list of candidate base directories and prefers the one containing the requested AS version folder, falling back to the legacy default. Preserves behavior for AS<=4.x.
There was a problem hiding this comment.
Pull request overview
Updates Automation Studio path resolution to support AS6’s newer default install directory while maintaining compatibility with legacy AS installs.
Changes:
- Add a candidate list of known Automation Studio base install directories (legacy + AS6 default locations).
- Introduce
_findASBase()to select the best base directory for a requested AS version (prefer bases containing that version). - Update
getASPath()to use the new base discovery logic instead of a single hardcoded path.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
AS <= 4.x installs to versioned folders like AS41/AS45/AS46 (major+minor). AS 6.x installs into a single AS6 folder where minor revisions (6.0, 6.1, 6.5, ...) share one install path. _parseASVersion now emits AS<major> when major >= 6 so getASBuildPath/getASPath resolve correctly for AS6 projects (e.g. an apj declaring Version="6.5.1.7" now maps to AS6 instead of the non-existent AS65).
sclaiborne
added a commit
that referenced
this pull request
May 1, 2026
Resolves the conflict introduced by the AS6 fix on main (#16). The fix to ASTools.getASPath / Project._parseASVersion has been ported into the new package locations: - aspython/paths.py: added _AS_BASE_CANDIDATES + _findASBase() so AS6 (which installs under 'C:\Program Files (x86)\BRAutomation') is discovered alongside the legacy 'C:\BrAutomation'. - aspython/project.py: Project._parseASVersion now returns 'AS6' for AS 6.x (major-only folder) and keeps 'AS<major><minor>' for AS <= 4.x. - tests/test_paths.py: covers _findASBase preference + legacy fallback. - tests/test_project.py: covers AS4/AS6 version parsing. The top-level ASTools.py shim is kept unchanged (kept ours).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AS6 installs to 'C:\Program Files (x86)\BRAutomation' instead of the legacy 'C:\BrAutomation'. getASPath() now probes a list of candidate base directories and prefers the one containing the requested AS version folder, falling back to the legacy default. Preserves behavior for AS<=4.x.
What:
Describe what the changes are.
Why:
Describe the improvement(s) that these changes bring. If applicable, describe the reasoning behind key implementation details.